<?php /* Smarty version 2.6.18, created on 2010-03-16 09:56:34
         compiled from createors.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'createors.tpl', 35, false),)), $this); ?>
<form name="mainForm" method="POST" id="mainForm">
    	<h1>Create ORS</h1>
    	<p style="vertical-align: top;">
        <div class="blue">
		<p class="right"><input type="button" value="Save" onclick="saveors();" /></p>
		<table border="0" width="100%">
			<tr>
				<td width="30">Country:</td>
				<td>
					<select style="width:250px;" id="country_code" onchange="document.getElementById('results').innerHTML='';doajaxAction('/account/retrieveSupplier/country_code/'+document.getElementById('country_code').value,0,'supplier');doajaxAction('/account/retrievePo/supplier_org_id/0',0,'podetail');">
					<option value="" ">--- Select Country ---</option>
						<?php $_from = $this->_tpl_vars['countries']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['country']):
?>                           
							<option value="<?php echo $this->_tpl_vars['country']['country_code']; ?>
" <?php if ($this->_tpl_vars['country']['country_code'] == $this->_tpl_vars['country_code']): ?>selected<?php endif; ?> ><?php echo $this->_tpl_vars['country']['country']; ?>
</option>
						<?php endforeach; endif; unset($_from); ?>
					</select>
				</td>				
				<td>PO Code:</td>
				<td id="podetail">
					<select>
					<option value"">--- Select PO ---</option>
					</select>
				</td>				
			</tr>
			<tr>
				<td width="30">Supplier:</td>
				<td id="supplier">
					<select style="width:250px;" name="user[supplier_org_id]" id="user[supplier]" onchange="document.getElementById('results').innerHTML = '';doajaxAction('/account/retrievePo/supplier_org_id/'+document.getElementById('user[supplier]').value,0,'podetail');">
					<option value="">--- Select Supplier ---</option>
					<?php $_from = $this->_tpl_vars['suppliers']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['supplier']):
?>
						<option value="<?php echo $this->_tpl_vars['supplier']['org_id']; ?>
"><?php echo $this->_tpl_vars['supplier']['supplier']; ?>
</option>
					<?php endforeach; endif; unset($_from); ?>
					</select>
				</td>
				<td>Delivery Date:</td>
				<td><?php echo ((is_array($_tmp=$this->_tpl_vars['date'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%m/%d/%Y") : smarty_modifier_date_format($_tmp, "%m/%d/%Y")); ?>
</td>
			<tr>			
		</table>		
        </div>  
            <div id="results">
                 
				 <table border="0"	width="100%">
					<tr >
						<td>MOID</td>
						<td>Common Name</td>
						<td>Size</td>
						<td>Age</td>
						<td>Batch No.</td>
						<td>Received</td>
						<td>DOA</td>
						<td>Reject</td>
						<td>Reason</td>
						<td>Tank</td>
						<td>No. of Purchased</td>
						<td>Cost</td>
						<td>Total Cost</td>
					</tr>
					<tr><td colspan="14"><hr></td></tr>
					
				 </table>
            	</div>                
            </div>
        </p>
</form>